package com.lb.controller;

import com.lb.service.building.BuildingService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author libin
 * @Date 2023/7/15 12:49
 * @since 1.0
 **/
@Slf4j
@RestController
@RequestMapping("/v1/api/third")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class BuildingController {

    private final BuildingService buildingService;

    /**
     * 初始化楼盘geohash数据
     *
     * @author libin
     * @date 2023/6/2 10:45
     **/
    @PostMapping(value = "/building/geo")
    public void initializeBuildingGEO() {

        buildingService.initializeBuildingGEO();
    }

    @GetMapping(value = "/test1")
    public String test1() {

        buildingService.test1();
        return "";
    }

    @GetMapping(value = "/test2")
    public void test2() {

        buildingService.test2();
    }

}
